package com.dpp.mapper;

import com.dpp.entity.InviteRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface InviteRecordMapper {
    @Insert("insert into invite_record (openid, pass, invite_openid, invite_time) VALUES (#{openid} ,#{pass} ,#{inviteOpenid} ,#{inviteTime}  )")
    void save(InviteRecord inviteRecord);
    @Select("SELECT * FROM invite_record WHERE openid=#{openid} ")
    List<InviteRecord> selectByOpenid(String openid);
}
